function len=distance1(City,n)
len=0;
for i=1:n-1
    len=len+sqrt(sum((City(i,:)-City(i+1,:)).^2));
end
len=len+sqrt(sum((City(n,:)-City(1,:)).^2));
end